<template>
  <div>
    <h2>父组件中的值</h2>
    <input type="text" v-model="text" />
    <CustomInput v-model="text" />
    <!-- <CustomInput :modelValue="text" @update:modelValue="(newVal) => (text = newVal)" /> -->
  </div>
</template>

<script setup>
import { ref } from 'vue'
import CustomInput from './CustomInput.vue'

// 父组件中维护一个响应式的数据text
const text = ref('')
</script>
